Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[App] Allow to use single quotes in file name with the --code command line option (Fix #60120) #60121

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

agiudiceandrea
Copy link
Contributor

Description

Properly escapes the single quotes in file name since it is wrapped in single quotes in the Python command run by QgsPythonRunner.

Fixes #60120.

@github-actions github-actions bot added this to the 3.42.0 milestone Jan 12, 2025
@agiudiceandrea agiudiceandrea added Bug Either a bug report, or a bug fix. Let's hope for the latter! backport release-3_34 backport release-3_40 and removed backport release-3_34 labels Jan 12, 2025
Copy link

github-actions bot commented Jan 12, 2025

🪟 Windows builds

Download Windows builds of this PR for testing.
Debug symbols for this build are available here.
(Built from commit a4bae25)

🪟 Windows Qt6 builds

Download Windows Qt6 builds of this PR for testing.
(Built from commit a4bae25)

@agiudiceandrea agiudiceandrea changed the title [App] Allow to use single quotes in file name passed to the --code command line option (Fix #60120) [App] Allow to use single quotes in file name with the --code command line option (Fix #60120) Jan 12, 2025
@btzy
Copy link
Contributor

btzy commented Jan 13, 2025

I think we should either use some proper escaping function in Qt, or write something to escape all non-printable characters too. Apparently on Linux, filenames can contain almost all non-printable characters, and they will also cause a problem here.

Copy link

The QGIS project highly values your contribution and would love to see this work merged! Unfortunately this PR has not had any activity in the last 14 days and is being automatically marked as "stale". If you think this pull request should be merged, please check

  • that all unit tests are passing

  • that all comments by reviewers have been addressed

  • that there is enough information for reviewers, in particular

    • link to any issues which this pull request fixes

    • add a description of workflows which this pull request fixes

    • add screenshots if applicable

  • that you have written unit tests where possible
    In case you should have any uncertainty, please leave a comment and we will be happy to help you proceed with this pull request.
    If there is no further activity on this pull request, it will be closed in a week.

@github-actions github-actions bot added the stale Uh oh! Seems this work is abandoned, and the PR is about to close. label Jan 27, 2025
@nyalldawson
Copy link
Collaborator

Possibly superseded by #60134

@github-actions github-actions bot removed the stale Uh oh! Seems this work is abandoned, and the PR is about to close. label Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport release-3_40 Bug Either a bug report, or a bug fix. Let's hope for the latter!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Windows: --code flag cannot accept paths with single quote (')
4 participants